package com.fivemin.enums;

/**
 * ClassName: ResponseEnum
 * Description: http响应枚举类
 * date: 2023/7/27 11:26
 *
 * @author fivemin
 * @since JDK 1.8
 */
public enum ResponseEnum {
    // OK
    SUCCESS(200,"OK"),
    // ERROR
    ERROR(-9,"未知异常");


    private final Integer code;
    private final String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "RespBeanEnum{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
